import sys

sys.path.append('../')
sys.path.append('interface')

from config import *
from pages import *
from admin import *
from detail import *
from login import *
from main import *
from sysconfig import *

with open('core.txt', 'r', encoding = 'utf-8') as file:
    techwords = [w.strip().lower() for w in file.readlines()]

    for w in techwords:
        jieba.add_word(w, 10000, 'n')


def uid():
    return ''.join([str(random.randint(0, 9)) for i in range(12)])


with app.test_request_context():
    url_for('static', filename = '*')

if __name__ == '__main__':
    app.config['DEBUG'] = True
    app.jinja_env.auto_reload = True
    app.config['TEMPLATES_AUTO_RELOAD'] = True
    app.run(host = '0.0.0.0', port = 8089, threaded = True, debug = True)
